home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 6893 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.4 KB

  1. Path: hades.dcs.napier.ac.uk!medusa!oose5016
  2. From: oose5016@dcs.napier.ac.uk (Olivier Poppon)
  3. Newsgroups: comp.lang.c++
  4. Subject: templates
  5. Date: 20 Feb 1996 10:37:05 GMT
  6. Organization: Computer Studies, Napier University, Edinburgh    
  7. Message-ID: <4gc88h$mgr@hades.dcs.napier.ac.uk>
  8. NNTP-Posting-Host: medusa.dcs.napier.ac.uk
  9. X-Newsreader: TIN [version 1.2 PL2]
  10.  
  11. Hi,
  12.  
  13. I'm using Borland c++ compiler (4.5), and I have some problem using templates.
  14. This is my problem
  15.     I can easily declare a class as a template and then run the program if the implementation of the methods aare in the same file as the main or the procedudre that use the template.
  16.  
  17. If I want to split up the code: main.cpp template1.cpp template2.cpp...
  18. Then Borland comes with an error at linking tiime saying undefined method for all the method of the template.
  19.  
  20. When I split up the code, I create a project which include all the cpp files.
  21. But...
  22.  
  23. I also have a look at the compiler option (there is an index for templates), but I don't understand how it works. If the solution is there can you give me a hand please
  24.  
  25.  
  26. Thanks
  27.  
  28. --
  29. ~~~~~~~~~~~~~~~~~~~~~~~~~~~|~~~~~~~~~~~~~~~~~~~~~~~~~~
  30. ~ Olivier POPPON       |Engaged at OS/2WARP speed~
  31. ~ oose5016@dcs.napier.ac.uk|_________________________~
  32. ~ Object Oriented Software Engineering - MSc         ~
  33. ~ Napier University - Edinburgh                 ~
  34. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 
  35.